using UnityEngine;

public class SoundScript : MonoBehaviour
{
	public static SoundScript Instance;

	public AudioClip[] clipBodyHit;

	public AudioClip[] clipBoneBreak;

	public AudioClip[] clipBeakVehicle;

	public AudioClip clipFireWork;

	public AudioClip SuccesSound;

	public AudioSource[] ads;

	public AudioSource adBG;

	public AudioClip[] clipBG;

	private bool muteMusic;

	private bool muteSound;

	private void Awake()
	{
		Instance = this;
		muteMusic = ((PlayerPrefs.GetInt("MUSIC") != 0) ? true : false);
		muteSound = ((PlayerPrefs.GetInt("SOUND") != 0) ? true : false);
		MonoBehaviour.print(muteSound);
	}

	public void _PlayClipHitBody()
	{
		if (!muteSound && !ads[0].isPlaying)
		{
			int num = UnityEngine.Random.Range(0, 3);
			ads[0].PlayOneShot(clipBodyHit[num]);
		}
	}

	public void _PlayClipBoneBreak()
	{
		if (!muteSound && !ads[1].isPlaying)
		{
			int num = UnityEngine.Random.Range(0, 3);
			ads[1].PlayOneShot(clipBoneBreak[num]);
		}
	}

	public void _playClipBreakVehicle()
	{
		if (!muteSound && !ads[2].isPlaying)
		{
			int num = UnityEngine.Random.Range(0, 2);
			ads[2].PlayOneShot(clipBeakVehicle[num]);
		}
	}

	public void playClip_fireWork()
	{
		if (!muteSound)
		{
			ads[2].PlayOneShot(clipFireWork);
		}
	}

	public void SuccessSoundCallBack()
	{
		if (!muteSound)
		{
			ads[2].PlayOneShot(SuccesSound);
		}
	}
}
